package cn.nyse.ktc_user;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.context.annotation.Bean;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;

import wfw.cn.ktc_common.unit.IdWorker;
import wfw.cn.ktc_common.unit.JwtUtil;

/**
 * @Description
 * @author admin
 * @date 2020-10-14 17:37:10
*/
@SpringBootApplication
@EnableConfigurationProperties({JwtUtil.class})
@EnableEurekaClient
public class UserApplication {

	public static void main(String[] args) {
		SpringApplication.run(UserApplication.class, args);
	}

	@Bean
	public IdWorker idWorker(){
		return new IdWorker();
	}

	@Bean
	public BCryptPasswordEncoder getPasswordEncoder(){
		return new BCryptPasswordEncoder();
	}
	
}
